{% extends 'blog/demo_base.html' %}

{% block title %}
    博客列表页
{% endblock %}

{% block body %}
    <h1>文章列表</h1>
    <table>
        <tr>
            <th>标题</th>
            <th>操作</th>
        </tr>

        {% for i in b_list %}
            {#  每次循环创建tr标签 #}
            <tr>
                <td><a href="{% url 'demo_detail' i.id %}">{{ i.title }}</a></td>
                <td>
                    <a href="{% url 'update' i.id %}">编辑</a>
                    <a href="{% url 'delete' i.id %}">删除</a>
                </td>
            </tr>

        {% endfor %}


    </table>

    <br>
    <a href="{% url 'demo_index' %}">返回首页</a>

{% endblock %}